package cn.yyh.serviceOrder.client;

import cn.yyh.commons.utils.R;
import cn.yyh.serviceOrder.domain.Product;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.*;

import javax.servlet.http.HttpServletRequest;

/**
 * @author 杨永航
 * @version 1.0
 * @Title: ProductClient
 * @Package: cn.yyh.serviceOrder.client
 * @date 2021/7/12
 */
@FeignClient(name = "service-product")
@Component
public interface ProductClient {

    @GetMapping("/serviceProduct/product/{id}")
    String getById(@PathVariable Long id, @RequestHeader(required = true)String token);

    @PostMapping("/serviceProduct/product/save")
    void saveOrUpdate(@RequestBody Product department,
                   @RequestHeader(required = true)String token);
}
